home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Big Mouth 9
/
Big_Mouth_The_09_1996_-_Side_A.d64
/
test run
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
1KB
|
47 lines
10 rem ** test racer **
20 poke 53280,5:poke 53281,11:poke 646,15
25 a=rnd(-ti)
30 p=15:r$=chr$(46):l$=chr$(44)
40 print chr$(147)
50 print:print tab(12);"** test racer **"
60 print" you are testing a new racing track in your car"
70 print" press < to go left and > to go right"
80 print" if you go off the run, you will crash"
100 print"";tab(5);" press space to begin playing [146]"
110 get a$:if a$<>chr$(32) then 110
120 fort=1 to 1000:next
130 :
140 rem ** the game **
150 :
160 w=40
170 print""
180 t=w/2-p/2
190 c=w/2:z=1
200 print tab(t);" [146]";tab(c);"@@";tab(t+p);" [146]"
210 z=z+1:if z=1000 then 400
220 r=rnd(1)
230 if r<0.5 and t>2 then t=t-1
240 if r>0.5 and t+p<w-2 then t=t+1
250 get a$
260 if a$=l$ then c=c-1
270 if a$=r$ then c=c+1
280 if c<t then 310
290 if c>p+t then 310
300 goto 200
310 fort=1 to 255:poke 53270,39:poke 53270,40:next
320 print" ** ! you crashed ! **"
330 print" your score is";z
340 print" perfect score is 1000"
350 goto 440
400 print tab(t);" finish [146]"
410 fort=1 to 1000:next
420 print" well done you completed the run!"
430 print" you got the perfect score of 1000!"
440 print" do you wanna play again?"
450 get a$:if a$<>"" then 450
460 get a$:if a$="y" then 100
470 if a$<>"n" then 460
480 print" hope you had fun. bye!"
490 print" (loading menu)"
500 load"the main menu/bm",8,1